home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
-
- # Include the cgi library from chapter 1.
-
- require "cgilib.pl";
-
- # Initialize some variables
-
- $data = "";
- %cgiDict;
- $theUrl = "";
-
- #Read the cgi input
-
- &readData(*data);
- &parseData(*data,*cgiDict);
-
- # See which radio button was selected
-
- if($cgiDict{"choice"} eq "Yahoo")
- {
- $theUrl = "http://www.yahoo.com";
- }
- else
- {
- $theUrl = "http://www.webcrawler.com";
- }
-
- #Output a complete url
-
- print "Location: ",$theUrl,"\n\n";
-
- 1;
-
-